package scut.facerecognition.service;

import cn.dev33.satoken.stp.SaTokenInfo;
import org.springframework.web.multipart.MultipartFile;
import scut.facerecognition.entity.dto.EmailDTO;
import scut.facerecognition.entity.dto.RegisterDTO;
import scut.facerecognition.entity.pojo.User;
import scut.facerecognition.result.Result;

import java.io.IOException;

public interface UserService {
    //用户注册
    Result<String> register(MultipartFile file, String email, String password, String nickname, String sex,
                            String birthday, String signature, String location, String school, String hobby);

    //用户登录
    Result<SaTokenInfo> login(RegisterDTO registerDTO);

   //用户关键操作人脸认证
    Result<String> faceRecognition(MultipartFile file) throws IOException, InterruptedException;

    //修改用户信息
    Result<String> updateUserInfo(MultipartFile file, String email, String password, String nickname, String sex,
                                  String birthday, String signature, String location, String school, String hobby);

    //获取用户信息
    Result<User> getUserInfo();

    //发送验证码
    Result<String> sendCode(EmailDTO emailDTO);

    //验证验证码是否正确
    Result<String> verifyCode(EmailDTO emailDTO);

    Result<User> getOtherInfo(RegisterDTO registerDTO);
}
